#include <iostream>
using namespace std;

struct {
	int len;
	int data[100];
} Data;

void mult(int data) {
	int temp = 0;
	for (int	i = 0; i < Data.len; i++) {
		int aim = Data.data[i] * data;
		temp = aim / 10;
		Data.data[i] = aim % 10;
	}
	Data.data[Data.len] = temp;
	if (temp != 0) {
		Data.len += 1;
	}
}

int main() {
	int n;
	cin >> n;
	Data.len = 1;
	Data.data[0] = 1;
	for (int i = 2; i <= n; i++) {
		mult(i);
	}
	for (int i = Data.len - 1; i >= 0; i--) {
		cout << Data.data[i];
	}
}